package ReflectDemo;

public class Stu {

        private String name;
        int age;
        public String address;

        public Stu() {
        }

        private Stu(String name) {
            this.name = name;
        }

        Stu(String name, int age) {
            this.name = name;
            this.age = age;
        }

        public Stu(String name, int age, String address) {
            this.name = name;
            this.age = age;
            this.address = address;
        }
        private void function(){
            System.out.println("function");
        }
        public void method1(){
            System.out.println("method");
        }
        public void method2(String s){
            System.out.println("method : " + s);
        }
        public String method3(String s, int i){
            return s + "," + i;
        }

        @Override
        public String toString() {
            return "ReflectDemo.Stu{" +
                    "name='" + name + '\'' +
                    ", age=" + age +
                    ", address='" + address + '\'' +
                    '}';
        }
    }

